package Data::Semantic::Net::IPAddress;

use strict;
use warnings;


our $VERSION = '0.02';


use base qw(Data::Semantic::Net);


__PACKAGE__
    ->mk_abstract_accessors(qw(is_internal))
    ->mk_boolean_accessors(qw(forbid_internal));


sub is_valid_normalized_value {
    my ($self, $value) = @_;
    return unless $self->SUPER::is_valid_normalized_value($value);
    $self->forbid_internal ? !$self->is_internal($value) : 1;
}


1;


__END__

{% USE p = PodGenerated %}

=head1 NAME

{% p.package %} - Base class for IP address semantic data classes

=head1 SYNOPSIS

    {% p.package %}->new;

=head1 DESCRIPTION

This class is a base class for semantic data objects representing IP addresses
- IPv4 and IPv6.

{% p.write_inheritance %}

=head1 METHODS

=over 4

{% p.write_methods %}

=back

{% PROCESS standard_pod %}

=cut

